//
//  QXSingleProductCollectionViewCell.swift
//  DanTangSwift
//
//  Created by 众力金融 on 2017/6/22.
//  Copyright © 2017年 ..... All rights reserved.
//

import UIKit

class QXSingleProductCollectionViewCell: UICollectionViewCell {

    @IBOutlet weak var iocnImageView: UIImageView!
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var likeBtn: UIButton!
    @IBOutlet weak var priceLabel: UILabel!
    
    @IBAction func likeBtnCLick(_ sender: Any) {
    }
    
    var model: QXSingleProductModel? {
        didSet {
            
            let url = model?.cover_image_url!
            iocnImageView.kf.setImage(with: URL(string: url!), placeholder: nil, options: nil, progressBlock: nil, completionHandler: nil)
            likeBtn.setTitle(" " + String(describing: model!.favorites_count!) + " ", for: .normal)
            titleLabel.text = model?.name
            priceLabel.text = "¥" + ((model?.price)?.description)!
            
        }
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

}
